@foreach($data as $item)
    <div class="card" style="padding-top: 20px">
        <div class="card-header text-85">
            <h3>{{ $item['title'] }}</h3>
        </div>

        <div class="card-body">
            @each('admin.apply-centre.content', $item['items'], 'data')
        </div>
    </div>
@endforeach


<script>
    $('input[name="need_vip"]').change(function (){
        Dcat.loading();

        $.ajax({
            url: "{{ admin_route('apply_store_module_need_vip', ['module' => '__MODULE__', 'slug' => '__SLUG__']) }}".replace('__MODULE__',  $(this).attr('data-module')).replace('__SLUG__', $(this).attr('data-slug')),
            type: 'POST',
            dataType: 'JSON',
            success: function (res){
                Dcat.loading(false);
                if (!res.status) {
                    Dcat.error(res.msg);
                } else {
                    Dcat.success(res.msg);
                }
            }
        })
    })
</script>
